Conversion Specifier
|
Argument Type
|
%%
|
a '%' character
|
%A, %a
|
full and abbreviated weekday name, respectively
|
%B, %b
|
full and abbreviated month name, respectively
|
%c
|
date and time designation for the locale
|
%d
|
day of the month as a decimal number (01-31)
|
%F
|
milliseconds as a decimal number (000-999)
|
%H, %I
|
hour based on a 24-hour or 12-hour clock as a decimal number, respectively. (00-23 or 01-12)
|
%j
|
day of the year as a decimal number (001-366)
|
%M
|
minute as a decimal number (00-59)
|
%m
|
month as a decimal number (01-12)
|
%p
|
AM/PM designation for the locale
|
%S
|
second as a decimal number (00-59)
|
%w
|
weekday as a decimal number (0-6), where Sunday is 0
|
%x
|
date using date representation for the locale
|
%X
|
time using time representation for the locale
|
%Y, %y
|
year with century (such as 1990) and year without century (00-99), respectively
|
%Z, %z
|
time zone abbreviation (such as PDT) and time zone offset in hours and minutes from GMT (HHMM), respectively
|